#include"queue.h"

int main(void)
{
     queue *q = queue_create();
     if(q == NULL)
          exit(1);
     datatype arr[]= {2,3,455,1,3};
     for (int i = 0; i < sizeof(arr) / sizeof(*arr); i++)
     {
          int ret = queue_enqueue(q, &arr[i]);
          if(ret == -1)
          {
               printf("queue is full!\n");
               break;
          }
     }
     queue_show(q);

     int tmp;
     queue_dequeue(q,&tmp);
     printf("DEQUEUE: %d\n", tmp);
     queue_show(q);

     queue_destory(&q);
     //queue_show(q);  //销毁成功将报段错误

     return 0;
}
